package project.menu.ordermenu;

import project.controllers.Messager;
import project.controllers.Printer;
import project.menu.IMenu;
import project.menu.IMenuItem;
import project.work.Navigator;
import controllers.IAutoservice;

public class ExportOrder implements IMenuItem{
	
	private String name= "Export orders";
	private final Integer id= 7;
	private static  IMenu submenu;	
	private Navigator navigator;
	
	public ExportOrder(){
		navigator=Navigator.getInstance();
	}
	
	
	public Integer getId() {
		return id;
	}
	

	
	public void action(IAutoservice autoservice) {
		autoservice.exportOrders();
		Printer.printMessage(Messager.SUCCESS_ORD_EXPORT);
		navigator.drawMenu(submenu);
				
	}

	public static void setMenu(IMenu menu) {
		submenu = menu;
	}

	
	public String getNameItem() {
		
		return name;
	}

}
